package com.bss.utils;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.security.core.Authentication;

public class BSSAuthenticationSuccessHandler implements
		org.springframework.security.web.authentication.AuthenticationSuccessHandler {

	private static final Logger LOGGER = Logger.getLogger(BSSAuthenticationSuccessHandler.class);

	public BSSAuthenticationSuccessHandler() {
		System.out.println("AuthenticationSuccessHandler initialized");
		BSSAuthenticationSuccessHandler.LOGGER.trace("AuthenticationSuccessHandler initialized");
	}

	public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
			throws IOException, ServletException {
		System.out.println("AuthenticationSuccessHandler called .");
		BSSAuthenticationSuccessHandler.LOGGER.trace("Authentication succeeded");
	}

}
